package com.kx.demo.jdk.collection;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author kx
 * @date 2020/4/11
 */
public class LinkedHashMapDemo {

    public static void main(String[] args) {
        Map<Integer, String> map = new LinkedHashMap<>(16, 0.75f, true);

        map.put(5, "hello");
        map.put(2, "hello");
        map.put(null, "hello");
        map.put(1, "hello");
//        System.out.println(map.get(1));
        map.get(2);
        System.out.println(map.keySet().toArray());

    }

}
